# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=trash-cli
pkgver=0.23.11.10
pkgrel=1
pkgdesc="Command line interface to the freedesktop.org trashcan"
url="https://github.com/andreafrancia/trash-cli"
arch="noarch"
license="GPL-2.0-or-later"
depends="python3 py3-psutil py3-six"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-mock py3-flexmock py3-parameterized"
subpackages="$pkgname-doc $pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/andreafrancia/trash-cli/archive/refs/tags/$pkgver.tar.gz"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest -v
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
2352f68ee0679c632b2d46f302e5a6ea9f370477e8df4dbc8b12bd555652dd322688d3309da7845c08c6e6c7acf4ceb7482410c25331c5ccedfea7649f1214f5  trash-cli-0.23.11.10.tar.gz
"
